<?php
/**
 * Created by PhpStorm.
 * User: wangye
 * Date: 19-2-25
 * Time: 上午10:39
 */
$arr = [1,2,3,4,5,6];
//foreach ($arr as $value) {
//    var_dump($value);
//}
//foreach ($arr as $key => $value) {
//    echo $key.':'.$value."\n";
//}

//for ($i=0;$i<count($arr);$i++) {
//    echo $i.':'.$arr[$i]."\n";
//}

$arr2 = [[
    'name' => 'dollarkiller',
    'age' => 20
],[
    'name' => 'kali',
    'age' => 19
]];

foreach ($arr2 as $value) {
    var_dump($value);
}

foreach ($arr2 as &$value) {
    $value['age']++;
    var_dump($arr2);
}
